import { apiPrefix } from '@/consts/consts'

export default ({ $service:request }) => ({
  // 4.5.5. License列表
  licenseList(params) {
    return request({
      url: `${apiPrefix}/api/v1/customer/license/list`,
      method: 'get',
      params
    })
  },

  // 4.5.6. 新增License
  licenseAdd(data,id) {
    return request({
      url: `${apiPrefix}/api/v1/customer/license/add/${id}`,
      method: 'post',
      data
    })
  },
      
  // 4.5.7. 续约License
  licenseRenew(id) {
    return request({
      url: `${apiPrefix}/api/v1/customer/license/renew/${id}`,
      method: 'post',
    })
  },
  
  // 4.5.8. 修改License
  licenseUpdate(data, id) {
    return request({
      url: `${apiPrefix}/api/v1/customer/license/update/${id}`,
      method: 'put',
      data
    })
  },
    
  // 4.5.9. 终止License
  licenseTermination(data,id) {
    return request({
      url: `${apiPrefix}/api/v1/customer/license/termination/${id}`,
      method: 'put',
      data
    })
  },



    //     4.12.3. 应用展示选择
  chooseAPPList(params) {
    return request({
      url: `${apiPrefix}/api/v1/choose/app/list`,
      method: 'get',
      params
    })
  },

   //     4.12.3. 应用展示选择
  chooseResourceList(params) {
    return request({
      url: `${apiPrefix}/api/v1/choose/resource/list`,
      method: 'get',
      params
    })
  },
  

})
